Recently, memory cards and devices mounting programmable nonvolatile memories are spreading widely as storage devices for storing digital information. In particular, memory cards are small and resistant to vibration, and are expected to be used more and more in portable appliances.
Typical programmable nonvolatile memory is a NAND type flash memory (called “flash memory” hereinafter). In the flash memory, usage state (used/unused) is managed by block unit. For example, “1” is written in management data for an unused block, and after data writing the management data is rewritten from “1” to “0”.
Very rarely, in a flash memory, data may not be written correctly. Accordingly, the flash memory has a function of reading status showing whether writing is normal or abnormal, and has to judge if writing is normal or not by reading the status after writing data. A certain memory card includes a controller for controlling the flash memory. The controller reads the status after writing of data, and rewrites the management data which is incorporated in the controller and corresponds to the error block from “1” to “0” when write error occurs.
It is also proposed that when data is not written normally, that is, when write error occurs, the data is written in other block again (hereinafter called “retry process”). Write error occurs, for example, when the flash memory has no vacant capacity, when write operation is impossible because of bad region of the flash memory, or when erase process fails on write operation.
In the data written in the flash memory, data may be deformed rarely by data writing into other block or due to aging effects. Hence, in order to assure desired data reliability as a memory card, when reading out data, for example, error correction code according to reliability of the flash memory is generated in block unit, is added to the block data, and written into the flash memory. When reading out data, the read data is processed by error processing, and is transferred to the host.
Thus, write error and read error rarely occurring in the flash memory can be avoided mostly by the retry process or the error correction process by the controller incorporated in the memory card. Accordingly, the host device can use the memory card without fear of data reliability of flash memory.
Patent document 1 discloses technology relating to such a retry process for write error in the flash memory.                Patent document 1: JP-A-2002-108720        